<template>
  <div class="side">
    <el-menu
      default-active="/home"
      :router="true"
      :collapse="isCollapse"
      ref="menu"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      :background-color="color"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="/home">
        <i class="el-icon-s-home"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-s-check"></i>
          <span>用户管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/user"
            ><i class="el-icon-user-solid"></i>用户管理</el-menu-item
          >
          <el-menu-item index="1-2" disabled>权限管理</el-menu-item>
          <el-menu-item index="/comment"
            ><i class="el-icon-chat-dot-round"></i>评论管理</el-menu-item
          >
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-c-scale-to-original"></i>
          <span>新闻管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/article"
            ><i class="el-icon-tickets"></i>新闻列表管理</el-menu-item
          >
          <el-menu-item index="/publish"
            ><i class="el-icon-edit-outline"></i>新闻资讯编写</el-menu-item
          >
          <el-menu-item index="/type"
            ><i class="el-icon-s-flag"></i>新闻类型管理</el-menu-item
          >
          <el-menu-item index="/tag"
            ><i class="el-icon-collection-tag"></i>新闻标签管理</el-menu-item
          >
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-c-scale-to-original"></i>
          <span>审核管理</span>
        </template>
        <el-menu-item index="/complain">
          <i class="el-icon-document"></i>
          <span slot="title">举报审核</span>
        </el-menu-item>
        <el-menu-item index="/authentication">
          <i class="el-icon-document"></i>
          <span slot="title">V认证审核</span>
        </el-menu-item>
      </el-submenu>
      <el-menu-item index="/information">
        <i class="el-icon-document"></i>
        <span slot="title">信息统计</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "Side",
  data() {
    return {
      // color:"#545c64"
    };
  },
  computed: {
    isCollapse() {
      return this.$store.state.isCollapse;
    },
    color(){
      return this.$store.state.color
    }
  },
  methods: {
    handleOpen() {},
    handleClose() {},
  },
};
</script>

<style>
.el-menu-vertical-demo {
  min-height: 100vh;
  min-width: 220px;
}
</style>